<?php
	include_once("../inc/parameters.php");
	include_once("../inc/db.class.php");
	include_once("../inc/JSON.php");

	$sql = "select fund_code, name from fund_information order by fund_code";

	$_MyDB	=	new dbClass();
	$_MyDB->db_connect();
	$_MyDB->query($sql);
	
	$js     = "[";
	$i      = 0;
	$arr		= Array();

	while($row = $_MyDB->NextRecord($result))
	{
		$arr[$i] = Array("text" => urlencode($row["name"]), "id" => $row["fund_code"], "leaf" => true, "cls" => 'file');
		
		$i++;
	}

	$json	=	new Services_JSON();
	echo $json->encode($arr);
?>